MC CASE : A COMPLEXITY MEASURE 309 CYCtoMATIC COMPLEXITY

نویسنده

  • THOMAS J. McCABE
چکیده

This paper describes a graph-theoretic complexity measure and illustrates how it can be used to manage and control program complexity .The paper first explains how the graph-theory concepts apply and gives an intuitive explanation of the graph concepts in programming terms. The control graphs of several actual Fortran programs are then presented to illustrate the conelation between intuitive complexity and the graph-theoretic complexity .Several properties of the graphtheoretic complexity are then proved which show, for example, that complexity is independent of physical size (adding or subtracting functional statements leaves complexity unchanged) and complexity depends only on the decision structure of a program. The issue of using non structured control flow )s also discussed. A characterization of nonstructured control graphs is given and a method of measuring the "structuredness" of a program is developed. The relationship between structure and reducibility is illustrated with several examples. The last section of this paper deals with a testing methodology used in conjunction with the complexity measure; a testing strategy is defined that dictates that a program can either admit of a certain minimal testing level or the program can be structurally reduced. Index Temls-Basis, complexity measure, control flow, decomposition, graph theory , independence, linear, modularization, programming, reduction, software, testing. II. A COMPLEXITY MEASURE In this sl~ction a mathematical technique for program modularization will be developed. A few defmitions and theorems from graph theory will be needed, but several examples will be presented in order to illustrate the applications of the technique. The complexity measure approach we will take is to measure and control the number of paths through a program. This approach, however, immediately raises the following nasty problem: "Any program with a backward branch potentially has an infinite number of paths." Although it is possible to defme a set of algebraic expressions that give the total number of possible paths through a (structured) program,l using the total number of paths has been found to be impractical. Because of this the complexity measure developed here is defmed in terms of basic paths-that when taken in combinatio~ will generate every possible path. The following mathematical preliminaries will be needed, all of which can be found in Berge [I] . Definition 1: The cyclomatic number V(G) of a graph G with n vertices, e edges, and p connected components is

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Measurement of Complexity and Comprehension of a Program Through a Cognitive Approach

The inherent complexity of the software systems creates problems in the software engineering industry. Numerous techniques have been designed to comprehend the fundamental characteristics of software systems. To understand the software, it is necessary to know about the complexity level of the source code. Cognitive informatics perform an important role for better understanding the complexity o...

متن کامل

The Relationship between Syntactic and Lexical Complexity in Speech Monologues of EFL Learners

: This study aims to explore the relationship between syntactic and lexical complexity and also the relationship between different aspects of lexical complexity. To this end, speech monologs of 35 Iranian high-intermediate learners of English on three different tasks (i.e. argumentation, description, and narration) were analyzed for correlations between one measure of sy...

متن کامل

A MULTI-OBJECTIVE OPTIMIZATION MODEL FOR PROJECT PORTFOLIO SELECTION CONSIDERING AGGREGATE COMPLEXITY: A CASE STUDY

Existing project selection models do not consider the complexity of projects as a selection criterion, while their complexity may prolong the project duration and even result in its failure. In addition, existing models cannot formulate the aggregate complexity of the selected projects. The aggregated complexity is not always equal to summation of complexity of projects because of possible syne...

متن کامل

A Novel Method for Detection of Epilepsy in Short and Noisy EEG Signals Using Ordinal Pattern Analysis

Introduction: In this paper, a novel complexity measure is proposed to detect dynamical changes in nonlinear systems using ordinal pattern analysis of time series data taken from the system. Epilepsy is considered as a dynamical change in nonlinear and complex brain system. The ability of the proposed measure for characterizing the normal and epileptic EEG signals when the signal is short or is...

متن کامل

Cognitive Task Complexity and Iranian EFL Learners’ Written Linguistic Performance across Writing Proficiency Levels

Recently tasks, as the basic units of syllabi, and the cognitive complexity, as the criterion for sequencing them, have caught many second language researchers’ attention. This study sought to explore the effect of utilizing the cognitively simple and complex tasks on high- and low-proficient EFL Iranian writers’ linguistic performance, i.e., fluency, accuracy, lexical complexity, and structura...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010